From: Keir Fraser Date: Tue, 19 May 2009 00:25:59 +0000 (+0100) Subject: x86 hvm: Provide x2APIC identifier in CPUID leaf 0xb. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13920 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=c9e8a6b158282727417437c5181eef5edcce35de;p=xen.git x86 hvm: Provide x2APIC identifier in CPUID leaf 0xb. Signed-off-by: Nitin A Kamble --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 000a70d9ac..15afec63e6 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1685,13 +1685,19 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx, domain_cpuid(v->domain, input, *ecx, eax, ebx, ecx, edx); - if ( input == 0x00000001 ) + switch ( input ) { + case 0x1: /* Fix up VLAPIC details. */ *ebx &= 0x00FFFFFFu; *ebx |= (v->vcpu_id * 2) << 24; if ( vlapic_hw_disabled(vcpu_vlapic(v)) ) __clear_bit(X86_FEATURE_APIC & 31, edx); + break; + case 0xb: + /* Fix the x2APIC identifier. */ + *edx = v->vcpu_id * 2; + break; } }